<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>计算属性</title>
<script type="text/javascript" src=https://vuejs.org/js/vue.js></script>
</head>
<body>

	<div id=root>
	<div v-if="show">hello word</div>
	<button @click="myclick">toggle</button>
	
	<ul>
	<li v-for="(item,index) of list" :key="index">{{item}}</li>
	</ul>
	</div>
<!-- 	<div id=root v-html="msg"></div> -->
	<script type="text/javascript">
	new Vue({
		el:"#root"
// 		,template:'<h1>hh {{msg}}</h1>'
		,data:{
			show:true
			,list:[1,2,3]
		}
		,methods:{
			myclick:function(){
				this.show=!this.show;
			}
		}
	
	})
	</script>
</body>
</html>